home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Container Common / CActiveXScheduler.h < prev    next >
Text File  |  1997-01-03  |  1KB  |  51 lines

  1. // ===========================================================================
  2. //    CActiveXIdleScheduler.h    ©1996 Microsoft Corporation. All rights reserved.
  3. // ===========================================================================
  4. //
  5. //    schedules Active X idle tasks
  6.  
  7. #include "HEADERS.H"
  8.  
  9. typedef struct
  10. {
  11.     IControl    *Control;
  12.     Uint32        ControlRefCon;
  13.     Uint32        WaitUntil;
  14.     Int32        Interval;
  15.     Boolean8    AfterAllEvents;
  16. }
  17. SchedControlStruct;
  18.  
  19.  
  20. class CActiveXScheduler
  21. {
  22. public:
  23.     // *** Constructors & Destructors ***
  24.     CActiveXScheduler(void);
  25.     ~CActiveXScheduler(void);
  26.  
  27.     // *** static scheduler accessor ***
  28.     static CActiveXScheduler*    GetActiveXScheduler(Boolean8 MakeIt = false);
  29.  
  30.     // *** scheduling functions ***
  31.     ErrorCode    Idle(Boolean8 NullEvent);
  32.     ErrorCode    IdleControl(Boolean8 NullEvent, IControl* inControl);
  33.     ErrorCode    ScheduleControl(Boolean8 AfterAllEvents, Int32 Interval, IControl* inControl, Uint32 ControlRefCon);
  34.     ErrorCode    RemoveControlByRefCon(IControl* inControl, Uint32 ControlRefCon);
  35.     ErrorCode    RemoveControl(IControl* inControl);
  36.  
  37.     Boolean8    HasNullEventItems(void);
  38.     Boolean8    HasAllEventItems(void);
  39.  
  40. private:
  41.     // *** private methods ***
  42.     void        Sort(void);
  43.  
  44.     // *** static variables ***
  45.     static CActiveXScheduler*    sActiveXScheduler;
  46.  
  47.     // *** member variables ***
  48.     SchedControlStruct**        mScheduledControls;
  49.     Boolean8                    mNeedsSorting;
  50. };
  51.